<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            background-color: red;
        }
    </style>
</head>
<body>
    <div></div>

    <script>
        let div = document.querySelector('div')
        div.onclick = function(){
            console.log('点击事件');    
        }
        div.addEventListener('mousedown',function(){
            console.log('鼠标按下');
            
        })
        div.addEventListener('mouseup',function(){
            console.log('鼠标抬起');
            
        })
        div.addEventListener('mouseover',function() {
        console.log('鼠标移入，mouseover会冒泡');
        
        })
        div.addEventListener('mouseout',function() {
        console.log('鼠标移出，mouseout会冒泡');
        
        })
        div.addEventListener('mouseenter',function() {
        console.log('鼠标移入，mouseenter不会冒泡');
        
        })
        div.addEventListener('mouseleave',function() {
        console.log('鼠标移出，mouseleave不会冒泡');
        
        })
        div.addEventListener('mousemove',function(){
            console.log('鼠标移动');
            
        })
    </script>   
</body>
</html>